package com.lili.userservice.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lili.userservice.entity.TbUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author lili
 * @since 2020-07-20
 */
public interface TbUserService extends IService<TbUser> {

    List<TbUser> findUserAndDept(@Param("current") Integer current, @Param("size") Integer size);

    Integer findUserAndDeptCount();

    Page<TbUser> findUserPage(Page<TbUser> page, QueryWrapper<TbUser> wrapper);

    /**
     * 导出用户信息
     * @param response
     * @throws IOException
     */
    void exprotUserInfoExcel(HttpServletResponse response,List<TbUser> tbUsers) throws IOException;

    /**
     * 导入用户信息
     * @param file
     * @throws IOException
     */
    void impeotUserInfoExcel(MultipartFile file) throws IOException;
}
